package beans;



public class LoginInfo {

	private String name = "";
	  private String password = "";
	  private boolean isRemember =false;
	  
	  
	  public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}
		
		
	  public String getPassword() {
			return password;
		}

		public void setPassword(String password) {
			this.password = password;
		}

	public boolean isRemember() {
			return isRemember;
		}

		public void setRemember(boolean isRemember) {
			this.isRemember = isRemember;
		}

	public boolean isComplete() {
		    return(hasValue(getName()) &&
		           hasValue(getPassword()));
		  }

		  /** Has any of the data been entered? */

		  public boolean isPartlyComplete() {
		    boolean flag =
		           (hasValue(getName()) ||
		           hasValue(getPassword()));
		    return(flag);
		  }

		  private boolean hasValue(String val) {
		    return((val != null) && (!val.equals("")));
		  }

		public String toString(){
			return "name:"+this.getName()+" pass:"+this.getPassword()+" remember me value:"+this.isRemember();
			
		}
}
